<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>Exclus&atilde;o de &Oacute;rg&atilde;o</title>
	</head>
    <body>
		<?php
			include 'parametros_conexao.php';
			
			$codigo_orgao	= array_key_exists( 'codigo_orgao', $_REQUEST ) ? $_REQUEST[ 'codigo_orgao' ] : FALSE;
			$conexao		= pg_connect( "host=$host port=$porta dbname=$base user=$usuario password=$senha" );
			$orgao			= FALSE;

			if( $codigo_orgao ){
				$orgao = pg_query( $conexao, "DELETE FROM " . $esquema . ".tb_org_orgao orgao WHERE orgao.num_codigo_pk = $codigo_orgao" );
				if( $orgao ){
					echo "&Oacute;rg&atilde;o exclu&iacute;do com sucesso";
				}
			}
		?>
		<br/>
		<a href="index.php">Voltar</a>
    </body>
</html>